<?php
	if(empty($_FILES['zhaopian']['tmp_name']))//判断上传文件是否存在
	{
		echo "<script> alert('没有选择文件');</script>";
		echo "<script>history.back();</script>";
	}
	else 
	{
		//上传文件
		move_uploaded_file($_FILES['zhaopian']['tmp_name'],"./file/".$_FILES['zhaopian']['name']);           
		//输出上传文件的保存路径
		echo 
		"<script>alert('上传完成!');</script>";
		echo 
		"<script>history.back();</script>";

	}
?>